Skip to content

[3.14] Improve hash() builtin docstring with caveats. (GH-125229)#149054

Merged
gpshead merged 1 commit intopython:3.14from
gpshead:backport-665b7df-3.14
Apr 27, 2026
Merged

[3.14] Improve hash() builtin docstring with caveats. (GH-125229)#149054
gpshead merged 1 commit intopython:3.14from
gpshead:backport-665b7df-3.14

Conversation

@gpshead
Copy link
Copy Markdown
Member

@gpshead gpshead commented Apr 27, 2026

Improve hash() builtin docstring with caveats.

Mention its return type and that the value can be expected to change between processes (hash randomization).

Why? The hash builtin gets reached for and used by a lot of people whether it is the right tool or not. IDEs surface docstrings and people use pydoc and help(hash).
(cherry picked from commit 665b7df)

)

Improve  `hash()` builtin docstring with caveats.

Mention its return type and that the value can be expected to change between
processes (hash randomization).

Why? The `hash` builtin gets reached for and used by a lot of people whether it
is the right tool or not. IDEs surface docstrings and people use pydoc and
`help(hash)`.
(cherry picked from commit 665b7df)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
@gpshead gpshead enabled auto-merge (squash) April 27, 2026 15:51
@gpshead gpshead merged commit bb8d6a0 into python:3.14 Apr 27, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant